Listing 06 - Page 0: No Title

##############################################################################
# Python From Scratch
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2024
# Site: https://pythonfromscratch.com
#
# File: listing\chapter 06\06.1119 - No Title.py
# Description: No Title
##############################################################################

L = [7, 9, 10, 12]
p = int(input("Enter a number to search for:"))
for e in L:
    if e == p:
        print("Item found!")
        break
else:
    print("Element not found.")
Click here to download the file